import { deployHttp } from '/@/utils/http/axios';
import { DeleteParams, SfsListItem, SfsQueryParams } from '/@/api/system-mgmt/sfs-mgmt/model/sfsModel';

enum Api {
  GET_SFS_LIST = '/v1/sfs/getSfsSpecList',
  ADD_OR_UPDATE_SFS = '/v1/sfs/creatOrUpdate',
  DELETE_SFS = '/v1/sfs/delete',
}

export const getSfsList = (params: SfsQueryParams) => {
  return deployHttp.get<SfsListItem[]>({
    url: Api.GET_SFS_LIST,
    params,
  });
};

export const addOrUpdateSfs = (params: SfsListItem) => {
  return deployHttp.post<string>({
    url: Api.ADD_OR_UPDATE_SFS,
    params,
  });
};

export const deleteSfs = (params: DeleteParams) => {
  return deployHttp.get<string>({
    url: Api.DELETE_SFS,
    params,
  });
};
